const request = (type , data , path) => {  
    return new Promise(resolve => {
        ajax({
            type ,
            data ,
            path ,
            successCB : res => {
                resolve(res)
            }
        })
    })
}


const reg = data => request('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/01reg.php') ;

const login = data => request('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/02login.php');

const oList = data => request('get' , data , 'http://192.168.59.11/prject_week/OIWAS/php/03list.php');

const details = data => request('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/04details.php');

const addToCart = data => request('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/03addToCart.php');

const cart = data => request ('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/05cart.php');

const cart_delete = data => request ('post' , data , 'http://192.168.59.11/prject_week/OIWAS/php/05delete.php');